<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>
</title>
<s:include value="head.jsp"></s:include>
<style type="text/css">
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	color: #000000;
	text-decoration: none;
}
a:hover {
	color: #7F0055;
	text-decoration: none;
}
a:active {
	color: #7F0055;
	text-decoration: none;
}
</style>
<script language="JavaScript" >

$(document).ready(function(){
	$('#pms0').addClass("select");
	$("#centerFrame003").attr("src","forwardAction.action?code=003");
	$("#PageControlPanel > div:eq(0)").show();
	$("#PageControlPanel > div > span").bind("click", function(event) { 
	});	
	$("#userExit").click(function(){
		var rv = confirm("您确认要注销退出吗？");
		if (rv)
		{
			location = "exit.jsp";
		}		
	});
});
function funcChange(index,code){
	$(".select").removeClass("select");
	var pmsA = '#pms'+index;
	$(pmsA).addClass("select");
	
	if (index == 0)
	{
		$("#labeljut").removeClass().addClass("labelonJut");
	}	
	$("#centerFrame" + code).attr("src","forwardAction.action?code="+code);
	$("#PageControlPanel > div:lt("+index+")").hide();
	$("#PageControlPanel > div:gt("+index+")").hide();
	$("#PageControlPanel > div:eq("+index+")").show();
	
}
function funcSwitch(index)
{
	$("#frmTitle"+index).toggle();

}
function timeClock() {
    var today = new Date();
    var year = today.getFullYear() + "-" + (today.getMonth()+1) + "-" + today.getDate();
    var time=CurentTime();
    var tim = year + " " + time;
    $("#nowtime").text(tim);
}
 function CurentTime(){
    var now = new Date();
    var hh = now.getHours();
    var mm = now.getMinutes();
    var ss = now.getTime() % 60000;
    ss = (ss - (ss % 1000)) / 1000;
    var clock = hh+':';
    if (mm < 10) clock += '0';
    clock += mm+':';
    if (ss < 10) clock += '0';
    clock += ss;
    return(clock);
}
 function userMgrFunc(){
		$("#centerFrame003").attr("src","forwardAction.action?code=003001");
		
		$("#PageControlPanel > div:lt(0)").hide();
		$("#PageControlPanel > div:gt(0)").hide();
		$("#PageControlPanel > div:eq(0)").show();
		}

//注意：在js中实现按时调用必须是这种方式——定时调用自己
function Timer(){
	timeClock();
	setTimeout("Timer()", 1000); // 循环定时调用
}		
</script>
</head>
<body onLoad="Timer();">
<div id="message__" class="showDiv">
</div>
<div id="screen__">
    <iframe id="iframeScreen__" scrolling="no" frameborder="0">
    </iframe>
</div>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td height="35"><s:include value="top.jsp"></s:include></td>
	</tr>
	<tr>
		<td>
		<table border=0 cellpadding=0 cellspacing=0 height='100%' width='100%'>
			<tr>
				<td width="100%" height="20"  align="left" valign="bottom">
							<ul id="nav">
							  <s:iterator value="subPermission" id="pms" status="ind">
							  <li  class="total">
							  <a id="pms${ind.index}" href="#" onclick="funcChange('${ind.index}','${pms.code}')">${pms.name}</a>
							  </li>
							  </s:iterator>	
							</ul>
							</td>
			<tr>
				<td  height='100%'  >
				   <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
					<tr>
                      <td id='PageControlPanel' width="100%" height="100%">
                     
						<s:iterator value="subPermission" id="pms" status="ind">
							<div style="display:none;height:100%;" id="content${ind.index}">
							   <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
<!--									<td width="168" id="frmTitle${ind.index}" height="100%" align="center" valign="top">-->
<!--                                     <s:if test="#ind.index == 0">-->
<!--										<iframe name="leftMenu${pms.code}" id="leftMenu${pms.code}" height="100%" width="168" src="forwardAction.action?code=${pms.code}" frameborder="0" style='overflow:auto;'></iframe>-->
<!--                                     </s:if>-->
<!--									 <s:else>-->
<!--										<iframe name="leftMenu${pms.code}" id="leftMenu${pms.code}" height="100%" width="168" frameborder="0" style='overflow:auto;'></iframe>-->
<!--									 </s:else>-->
<!--									</td>-->
<!--									<td width="5" valign="middle" bgcolor="#2E8A98" onclick="funcSwitch('${ind.index}')">-->
<!--									<span class="navPoint" id="switchPoint" title="关闭/打开左栏"> -->
<!--										<img src="images/main/main_41.gif" name="img1" width="7" height="52" id="img1">-->
<!--									</span>-->
<!--									</td>-->
									<td align="center" valign="top" height="100%">
								 
									  <iframe name="centerFrame${pms.code}"  align="center" id="centerFrame${pms.code}" height="100%" width="100%" src="welcome.jsp" frameborder="0" scrolling="auto"></iframe>
                                  </td> 
								   </tr>
							    </table>				
					        </div>
					    </s:iterator>
                         <s:if test="subPermission.size() <= 0">
							<div style="display:black;height:100%;" id="content0">
							   <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td align="center" valign="top" width="100%" height="100%">
									  <iframe name="centerFrame" id="centerFrame" SCROLLING="auto"   height="100%" width="100%" src="info.jsp" frameborder="0"   scrolling="yes"></iframe>
                                    </td> 
								   </tr>
							    </table>				
					        </div>
                          </s:if>
					 </td>  
                    </tr>
				 </table>
				</td>
			</tr>
		</table>
       </td>
	</tr>
	<tr>
		<td height="30"><s:include value="foot.jsp"></s:include></td>
	</tr>
</table>
</body>
</html>
